/*
* 配置表;
*/


//车类型
var CarType = { 
    RILI:1,  //尼桑
    AODI:2,   //奥迪
    BENTIAN:3, //本田
    BAOMA:4,   //宝马
    BENCHI:5,  //奔驰
    DAZHONG:6,  //大众
    MAZIDA:7,   //马自达
    LEIKESASI:8  //雷克萨斯 
}

//转盘配置表
var Config = (function () {
    function Config() {
        this.data = {}
        this.data.carCofig = Laya.Loader.getRes("res/config/carConfig.json");
        this.data.betCofig = {
            [1]:{typ:CarType.MAZIDA,rate:4},
            [2]:{typ:CarType.LEIKESASI,rate:6},
            [3]:{typ:CarType.BENTIAN,rate:6},
            [4]:{typ:CarType.BAOMA,rate:10},
            [5]:{typ:CarType.BENCHI,rate:10},
            [6]:{typ:CarType.RILI,rate:6},
            [7]:{typ:CarType.AODI,rate:6},
            [8]:{typ:CarType.DAZHONG,rate:4}, 
        }

        this.data.carResCofig = {
            [CarType.MAZIDA]:"bao/result11.png",
            [CarType.LEIKESASI]:"bao/result10.png",
            [CarType.BENTIAN]:"bao/result2.png",
            [CarType.BAOMA]:"bao/result13.png",
            [CarType.BENCHI]:"bao/result3.png",
            [CarType.RILI]:"bao/result14.png",
            [CarType.AODI]:"bao/result16.png",
            [CarType.DAZHONG]:"bao/result12.png",
        }

        

    } 
    var _proto_ = Config.prototype
    _proto_.getCarConfig = function(index){
        return this.data.carCofig[index]
    } 
 
    _proto_.getBetConfig = function(index){
        return this.data.betCofig[index]
    } 

    _proto_.getCarResConfig = function(carTyp){
        return  this.data.carResCofig[carTyp]
    }

    Config.getInstance = function(){
        return Config.instance = Config.instance || new Config();
    }

    Config.instance = null; 

    return Config;
}());